﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdatePwd.aspx.cs" Inherits="BoCaiWeb.WebSite.WebAdmin.UpdatePwd" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="BoCaiWeb.Model" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>修改密码</title>
    <link href="/css/admin/admin.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script type="text/javascript" src="/js/admin/admin.js"></script>
</head>
<body>
    <div class="titlebt">修改密码</div>
    <!--显示列表-->
    <div id="all">
        <div class="k_all3">
            <form action="" method="post" onsubmit="return checkdata()">
            <table width="100%" cellpadding="0" cellspacing="0" id="bk">
                <tbody>
                    <tr>
                        <td width="326" height="35" align="right">
                            用户登录名：
                        </td>
                        <td width="990">
                            <%=User.Identity.Name%>
                        </td>
                    </tr>
                    <tr>
                        <td width="326" height="35" align="right">
                            <span class="red">*</span>老密码：
                        </td>
                        <td width="990">
                            <input type="password" id="oldpassword" name="oldpassword" value=""  data-val="true" data-val-required="*老密码是必填项！" data-val-length-min="6" data-val-length-max="20" data-val-length="*密码需要在6-20位之间！"/>
                            <span class="field-validation-valid" data-valmsg-for="oldpassword" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="326" height="35" align="right">
                            <span class="red">*</span>新密码：
                        </td>
                        <td width="990">
                            <input type="password" id="newpassword" name="newpassword" value=""  data-val="true" data-val-required="*新密码是必填项！" data-val-length-min="6" data-val-length-max="20" data-val-length="*密码需要在6-20位之间！"/>
                            <span class="field-validation-valid" data-valmsg-for="newpassword" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td width="326" height="35" align="right">
                            <span class="red">*</span>确认新密码：
                        </td>
                        <td width="990">
                            <input type="password" id="dnewpassword" name="dnewpassword" value=""  data-val="true" data-val-required="*确认新密码是必填项！" data-val-length-min="6" data-val-length-max="20" data-val-length="*密码需要在6-20位之间！"/>
                            <span class="field-validation-valid" data-valmsg-for="dnewpassword" data-valmsg-replace="true"></span>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" height="35">
                            <div class="pl200">
                                <input type="submit" class="butt_tle" style="width: 50px" value="确定" />
                                <input type="button" class="butt_tle" style="width: 80px" value="返回列表" onclick='location.href="SysUsers.aspx"'/>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        function checkdata() {
            if ($("#password").val() != $("#dpassword").val()) {
                var obj = $("span[data-valmsg-for=\"dpassword\"]");
                obj.addClass("field-validation-error").removeClass("field-validation-valid").html("*两次密码必须一致！").show();
                return false;
            }
            return true;
        }
    </script>
</body>
</html>
